/******************************************************************************
 * Copyright (C) 2017, Huada Semiconductor Co.,Ltd All rights reserved.
 *
 * This software is owned and published by:
 * Huada Semiconductor Co.,Ltd ("HDSC").
 *
 * BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
 * BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
 *
 * This software contains source code for use with HDSC
 * components. This software is licensed by HDSC to be adapted only
 * for use in systems utilizing HDSC components. HDSC shall not be
 * responsible for misuse or illegal use of this software for devices not
 * supported herein. HDSC is providing this software "AS IS" and will
 * not be responsible for issues arising from incorrect user implementation
 * of the software.
 *
 * Disclaimer:
 * HDSC MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE,
 * REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),
 * ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING,
 * WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED
 * WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED
 * WARRANTY OF NONINFRINGEMENT.
 * HDSC SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT,
 * NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT
 * LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
 * LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR
 * INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,
 * SAVINGS OR PROFITS,
 * EVEN IF Disclaimer HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 * YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR
 * INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED
 * FROM, THE SOFTWARE.
 *
 * This software may be replicated in part or whole for the licensed use,
 * with the restriction that this Disclaimer and Copyright notice must be
 * included with each copy of this software, whether used in part or whole,
 * at all times.
 */
/******************************************************************************/
/** \file stkhc32l13x.h
 **
 ** stk board common define.
 ** @link SampleGroup Some description @endlink
 **
 **   - 2018-03-09  1.0  Lux First version.
 **
 ******************************************************************************/
#ifndef __BOARD_STKHC32L13X_H__
#define __BOARD_STKHC32L13X_H__

/**
 * MCU: HC32L130J8TA QFN48
 * FLASH:   64K
 * RAM:     8K
 * GPIO:    40
 * LPTIM:   1
 * TIM:     7
 * LPUART:  2
 * USART:   2
 * I2C:     2
 * SPI:     2
 * ADC:     17ch
 *
 *                               __|__|__|__|__|__|__|__|__|__|__|__|__
 *                              | 48 47 46 45 44 43 42 41 40 39 38 37 |
 *                            --| 01                               36 |--
 *                            --| 02                               35 |--
 *                            --| 03                               34 |--
 *                            --| 04                               33 |--
 *                            --| 05                               32 |--
 *                            --| 06                               31 |--
 *                            --| 07                               30 |--
 *                            --| 08                               29 |--
 *                            --| 09                               28 |--
 *                            --| 10                               27 |--
 *                            --| 11                               26 |--
 *                            --| 12                               25 |--
 *                            --| 13 14 15 16 17 18 19 20 21 22 23 24 |--
 *                              --|--|--|--|--|--|--|--|--|--|--|--|--
 *
 *
 * Pin NUMBER   PIN NAME        PIN FUN         LABELs
 * 34           PA3             SWDIO
 * 37           PA14            SWCLK
 */

#if !defined(VERSION)
#define VERSION "1"
#endif

#if !defined(BUILD_TIME)
#define BUILD_TIME __DATE__
#endif

#define SWD_CLK_PORT GpioPortA
#define SWD_CLK_PIN  GpioPin14
#define SWD_DIO_PORT GpioPortA
#define SWD_DIO_PIN  GpioPin13

#if defined(BOARD_BK8400)
#include "bk8400/bk8400.h"
#include "bk8400/key.h"
#include "bk8400/led.h"
#include "common/eeprom.h"
#include "common/power.h"
#include "common/store.h"
#define BOARD_NAME "BK8400"
#elif defined(BOARD_BK8010)
#include "bk8010/alarm.h"
#include "bk8010/bk8010.h"
#include "bk8010/bsp_adc.h"
#include "bk8010/led.h"
#include "common/eeprom.h"
#include "common/power.h"
#include "common/store.h"
#define BOARD_NAME "BK8010"
#elif defined(BOARD_BK8002)
#include "bk8002/bk8002.h"
#include "bk8002/bsp_adc.h"
#include "bk8002/dev_io.h"
#include "bk8002/led.h"
#include "common/eeprom.h"
#include "common/power.h"
#include "common/store.h"
#define BOARD_NAME "BK8002"
#else
#error "Board is not defined"
#endif

#endif
